package com.hilon.foundation.main_child;


import com.hilon.foundation.main.BaseMain;
import jakarta.persistence.Entity;
import jakarta.persistence.Inheritance;
import jakarta.persistence.InheritanceType;
import jakarta.persistence.Transient;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public abstract class EntityBaseMain<C extends EntityBaseChild,VC extends EntityBaseChild> extends BaseMain {
    @Transient
    protected List<C> children;
    @Transient
    protected List<VC> childrenView;

    @Override
    public String toString() {
        return "EntityBaseMain{" +
                "children=" + children +
                ", childrenView=" + childrenView +
                '}';
    }
}
